-- GENERATED SPELL FOR [Rayne] --


function spell0_29181(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(20664,pUnit)
pUnit:RegisterEvent('Sorts_29181', 12000, 1)
end

function spell1_29181(pUnit, Event) --@Starfall,n/a--
pUnit:FullCastSpellOnTarget(20687,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29181', 10000, 1)
end

function spell2_29181(pUnit, Event) --@Tranquility,Self--
pUnit:FullCastSpellOnTarget(25817,pUnit)
pUnit:RegisterEvent('Sorts_29181', 10000, 1)
end

function spell3_29181(pUnit, Event) --@Wrath,n/a--
pUnit:FullCastSpellOnTarget(21807,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29181', 2000, 1)
end

function Sorts_29181(pUnit, Event)
local choix_sorts_29181 = math.random(0, 3)
if choix_sorts_29181 == 0 then
pUnit:RegisterEvent('spell0_29181', 1, 1)
end
if choix_sorts_29181 == 1 then
pUnit:RegisterEvent('spell1_29181', 1, 1)
end
if choix_sorts_29181 == 2 then
pUnit:RegisterEvent('spell2_29181', 1, 1)
end
if choix_sorts_29181 == 3 then
pUnit:RegisterEvent('spell3_29181', 1, 1)
end
end

function mob29181_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29181', math.random(1500, 3000), 1)
end

function mob29181_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29181_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29181_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29181, 1, 'mob29181_Action')
RegisterUnitEvent(29181, 2, 'mob29181_Leave')
RegisterUnitEvent(29181, 3, 'mob29181_Kill')
RegisterUnitEvent(29181, 4, 'mob29181_Die')
